<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>文档增删改</title>
  <script src="jquery-1.11.3.min.js"></script>
 </head>
 <body>
    <ul id="ul1">
	   <li>AAAAA</li>
	   <li title="hello">BBBBB</li>
	   <li class="box">CCCCC</li>
	   <li title="hello">DDDDD</li>
	   <li title="two">EEEEE</li>
	   <li>FFFFF</li>
	</ul>
	<br>
	<ul id="ul2">
	   <li>aaaaa</li>
	   <li>bbbbb</li>
	   <p>ccccc</p>
	</ul>
 </body>
 <script>
    $("#ul1").append("<span>append()添加span</span><br>");
	$("<span>appendTo()添加span</span>").appendTo($("#ul1"));
	$("#ul1").prepend("<span>prepend()添加span</span>");
	$("<span>prependTo()添加span</span><br>").prependTo($("#ul1"));
	$("#ul1").children("li[title=hello]").before("<span>before()添加span</span>");
	$("#ul1 li[title=hello]").after("<span>after()添加span</span>");
	$("#ul1").children("li[title=hello]").replaceWith("<p>replaceWith()替换</p>");
	$("#ul2 li").remove();
 </script>
</html>
